package cn.sykj.car.entity;

import cn.sykj.car.utils.excel.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户注册信息
 * </p>
 *
 * @author duanzis
 * @since 2021-06-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CarUsers对象", description="用户注册信息")
public class CarUsers extends Model<CarUsers> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户名-车主姓名")
    @Excel(name = "用户名",sort = "B")
    private String userName;

    @ApiModelProperty(value = "密码：MD5(userName+password)加密")
    private String password;

    @ApiModelProperty(value = "门店id")
    private Integer storeId;

    @ApiModelProperty(value = "车主联系方式（一般为手机号）")
    @Excel(name = "车主联系方式",sort = "E")
    private String userTel;

    @ApiModelProperty(value = "微信登录时的openId")
    private String openId;

    @ApiModelProperty(value = "注册日期")
    @Excel(name = "注册日期",sort = "R")
    private Date regDate;

    @ApiModelProperty(value = "会员卡编号：自动生成，建议2位年+2位月+2位日+2位时+2位分+2位秒+3位随机数")
    @Excel(name = "会员卡编号",sort = "G")
    private String userCode;

    @ApiModelProperty(value = "启用/禁用：0-启用（默认） 1-禁用")
    private Integer useFlag;

    private Date createTime;

    @Excel(name = "修改时间",sort = "S")
    private Date updateTime;

    private String createUser;

    @Excel(name = "修改人",sort = "S")
    private String updateUser;

    @ApiModelProperty(value = "删除标记：0-正常  1-删除")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "注册途径：1-公众号  2-后台注册")
    private Integer regWay;

    @ApiModelProperty(value = "性别：1-男 0-女")
    private Integer sex;

    @ApiModelProperty(value = "会员真实姓名")
    @Excel(name = "会员真实姓名",sort = "C")
    private String realName;

    @ApiModelProperty(value = "会员生日")
    private String birthday;

    @ApiModelProperty(value = "会员所在行业")
    private String industry;


    public static final String ID = "id";

    public static final String USER_NAME = "user_name";

    public static final String PASSWORD = "password";

    public static final String STORE_ID = "store_id";

    public static final String USER_TEL = "user_tel";

    public static final String OPEN_ID = "open_id";

    public static final String REG_DATE = "reg_date";

    public static final String USER_CODE = "user_code";

    public static final String USE_FLAG = "use_flag";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String CREATE_USER = "create_user";

    public static final String UPDATE_USER = "update_user";

    public static final String DEL_FLAG = "del_flag";

    public static final String REG_WAY = "reg_way";

    public static final String SEX = "sex";

    public static final String REAL_NAME = "real_name";

    public static final String BIRTHDAY = "birthday";

    public static final String INDUSTRY = "industry";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
